﻿using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.Serialization;

namespace HalconDotNet
{
	/// <summary>Represents a dual quaternion.</summary>
	// Token: 0x02000037 RID: 55
	[Serializable]
	public class HDualQuaternion : HData, ISerializable, ICloneable
	{
		/// <summary>Create an uninitialized instance.</summary>
		// Token: 0x06000511 RID: 1297 RVA: 0x0000B2A8 File Offset: 0x000094A8
		public HDualQuaternion()
		{
		}

		// Token: 0x06000512 RID: 1298 RVA: 0x0000B2B0 File Offset: 0x000094B0
		public HDualQuaternion(HTuple tuple) : base(tuple)
		{
		}

		// Token: 0x06000513 RID: 1299 RVA: 0x0000B2B9 File Offset: 0x000094B9
		internal HDualQuaternion(HData data) : base(data)
		{
		}

		// Token: 0x06000514 RID: 1300 RVA: 0x0001DA2C File Offset: 0x0001BC2C
		internal static int LoadNew(IntPtr proc, int parIndex, HTupleType type, int err, out HDualQuaternion obj)
		{
			HTuple t;
			err = HTuple.LoadNew(proc, parIndex, err, out t);
			obj = new HDualQuaternion(new HData(t));
			return err;
		}

		// Token: 0x06000515 RID: 1301 RVA: 0x0001DA54 File Offset: 0x0001BC54
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HDualQuaternion obj)
		{
			return HDualQuaternion.LoadNew(proc, parIndex, HTupleType.MIXED, err, out obj);
		}

		// Token: 0x06000516 RID: 1302 RVA: 0x0001DA60 File Offset: 0x0001BC60
		internal static HDualQuaternion[] SplitArray(HTuple data)
		{
			int num = data.Length / 8;
			HDualQuaternion[] array = new HDualQuaternion[num];
			for (int i = 0; i < num; i++)
			{
				array[i] = new HDualQuaternion(new HData(data.TupleSelectRange(i * 8, (i + 1) * 8 - 1)));
			}
			return array;
		}

		/// <summary>
		///   Convert a 3D pose to a unit dual quaternion.
		///   Modified instance represents: Unit dual quaternion.
		/// </summary>
		/// <param name="pose">3D pose.</param>
		// Token: 0x06000517 RID: 1303 RVA: 0x0001DAB4 File Offset: 0x0001BCB4
		public HDualQuaternion(HPose pose)
		{
			IntPtr proc = HalconAPI.PreCall(2080);
			HalconAPI.Store(proc, 0, pose);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(pose);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Convert a screw into a dual quaternion.
		///   Modified instance represents: Dual quaternion.
		/// </summary>
		/// <param name="screwFormat">Format of the screw parameters. Default: "moment"</param>
		/// <param name="axisDirectionX">X component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionY">Y component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionZ">Z component of the direction vector of the screw axis.</param>
		/// <param name="axisMomentOrPointX">X component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointY">Y component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointZ">Z component of the moment vector or a point on the screw axis.</param>
		/// <param name="rotation">Rotation angle in radians.</param>
		/// <param name="translation">Translation.</param>
		// Token: 0x06000518 RID: 1304 RVA: 0x0001DB10 File Offset: 0x0001BD10
		public HDualQuaternion(string screwFormat, HTuple axisDirectionX, HTuple axisDirectionY, HTuple axisDirectionZ, HTuple axisMomentOrPointX, HTuple axisMomentOrPointY, HTuple axisMomentOrPointZ, HTuple rotation, HTuple translation)
		{
			IntPtr proc = HalconAPI.PreCall(2086);
			HalconAPI.StoreS(proc, 0, screwFormat);
			HalconAPI.Store(proc, 1, axisDirectionX);
			HalconAPI.Store(proc, 2, axisDirectionY);
			HalconAPI.Store(proc, 3, axisDirectionZ);
			HalconAPI.Store(proc, 4, axisMomentOrPointX);
			HalconAPI.Store(proc, 5, axisMomentOrPointY);
			HalconAPI.Store(proc, 6, axisMomentOrPointZ);
			HalconAPI.Store(proc, 7, rotation);
			HalconAPI.Store(proc, 8, translation);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(axisDirectionX);
			HalconAPI.UnpinTuple(axisDirectionY);
			HalconAPI.UnpinTuple(axisDirectionZ);
			HalconAPI.UnpinTuple(axisMomentOrPointX);
			HalconAPI.UnpinTuple(axisMomentOrPointY);
			HalconAPI.UnpinTuple(axisMomentOrPointZ);
			HalconAPI.UnpinTuple(rotation);
			HalconAPI.UnpinTuple(translation);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Convert a screw into a dual quaternion.
		///   Modified instance represents: Dual quaternion.
		/// </summary>
		/// <param name="screwFormat">Format of the screw parameters. Default: "moment"</param>
		/// <param name="axisDirectionX">X component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionY">Y component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionZ">Z component of the direction vector of the screw axis.</param>
		/// <param name="axisMomentOrPointX">X component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointY">Y component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointZ">Z component of the moment vector or a point on the screw axis.</param>
		/// <param name="rotation">Rotation angle in radians.</param>
		/// <param name="translation">Translation.</param>
		// Token: 0x06000519 RID: 1305 RVA: 0x0001DBD8 File Offset: 0x0001BDD8
		public HDualQuaternion(string screwFormat, double axisDirectionX, double axisDirectionY, double axisDirectionZ, double axisMomentOrPointX, double axisMomentOrPointY, double axisMomentOrPointZ, double rotation, double translation)
		{
			IntPtr proc = HalconAPI.PreCall(2086);
			HalconAPI.StoreS(proc, 0, screwFormat);
			HalconAPI.StoreD(proc, 1, axisDirectionX);
			HalconAPI.StoreD(proc, 2, axisDirectionY);
			HalconAPI.StoreD(proc, 3, axisDirectionZ);
			HalconAPI.StoreD(proc, 4, axisMomentOrPointX);
			HalconAPI.StoreD(proc, 5, axisMomentOrPointY);
			HalconAPI.StoreD(proc, 6, axisMomentOrPointZ);
			HalconAPI.StoreD(proc, 7, rotation);
			HalconAPI.StoreD(proc, 8, translation);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		// Token: 0x0600051A RID: 1306 RVA: 0x0001DC6C File Offset: 0x0001BE6C
		void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = this.SerializeDualQuat();
			byte[] value = hserializedItem;
			hserializedItem.Dispose();
			info.AddValue("data", value, typeof(byte[]));
		}

		// Token: 0x0600051B RID: 1307 RVA: 0x0001DCA4 File Offset: 0x0001BEA4
		[EditorBrowsable(EditorBrowsableState.Never)]
		public HDualQuaternion(SerializationInfo info, StreamingContext context)
		{
			HSerializedItem hserializedItem = new HSerializedItem((byte[])info.GetValue("data", typeof(byte[])));
			this.DeserializeDualQuat(hserializedItem);
			hserializedItem.Dispose();
		}

		/// <summary>Serialize object to binary stream in HALCON format</summary>
		// Token: 0x0600051C RID: 1308 RVA: 0x0001DCE4 File Offset: 0x0001BEE4
		public void Serialize(Stream stream)
		{
			HSerializedItem hserializedItem = this.SerializeDualQuat();
			hserializedItem.Serialize(stream);
			hserializedItem.Dispose();
		}

		/// <summary>Deserialize object from binary stream in HALCON format</summary>
		// Token: 0x0600051D RID: 1309 RVA: 0x0001DCF8 File Offset: 0x0001BEF8
		public static HDualQuaternion Deserialize(Stream stream)
		{
			HDualQuaternion hdualQuaternion = new HDualQuaternion();
			HSerializedItem hserializedItem = HSerializedItem.Deserialize(stream);
			hdualQuaternion.DeserializeDualQuat(hserializedItem);
			hserializedItem.Dispose();
			return hdualQuaternion;
		}

		// Token: 0x0600051E RID: 1310 RVA: 0x0001DD1E File Offset: 0x0001BF1E
		object ICloneable.Clone()
		{
			return this.Clone();
		}

		// Token: 0x0600051F RID: 1311 RVA: 0x0001DD28 File Offset: 0x0001BF28
		public HDualQuaternion Clone()
		{
			HSerializedItem hserializedItem = this.SerializeDualQuat();
			HDualQuaternion hdualQuaternion = new HDualQuaternion();
			hdualQuaternion.DeserializeDualQuat(hserializedItem);
			hserializedItem.Dispose();
			return hdualQuaternion;
		}

		/// <summary>Composes two dual quaternions</summary>
		// Token: 0x06000520 RID: 1312 RVA: 0x0001DD4E File Offset: 0x0001BF4E
		public static HDualQuaternion operator *(HDualQuaternion left, HDualQuaternion right)
		{
			return left.DualQuatCompose(right);
		}

		/// <summary>Convert to pose</summary>
		// Token: 0x06000521 RID: 1313 RVA: 0x0001DD57 File Offset: 0x0001BF57
		public static implicit operator HPose(HDualQuaternion dualQuaternion)
		{
			return dualQuaternion.DualQuatToPose();
		}

		/// <summary>Convert to matrix</summary>
		// Token: 0x06000522 RID: 1314 RVA: 0x0001DD5F File Offset: 0x0001BF5F
		public static implicit operator HHomMat3D(HDualQuaternion dualQuaternion)
		{
			return dualQuaternion.DualQuatToHomMat3d();
		}

		/// <summary>Conjugate a dual quaternion</summary>
		// Token: 0x06000523 RID: 1315 RVA: 0x0001DD67 File Offset: 0x0001BF67
		public static HDualQuaternion operator ~(HDualQuaternion dualQuaternion)
		{
			return dualQuaternion.DualQuatConjugate();
		}

		/// <summary>Create a dual quaternion from eight double values </summary>
		// Token: 0x06000524 RID: 1316 RVA: 0x0001DD6F File Offset: 0x0001BF6F
		public HDualQuaternion(double realW, double realX, double realY, double realZ, double dualW, double dualX, double dualY, double dualZ) : base(new HTuple(new double[]
		{
			realW,
			realX,
			realY,
			realZ,
			dualW,
			dualX,
			dualY,
			dualZ
		}))
		{
		}

		/// <summary>Create a dual quaternion from two quaternions </summary>
		// Token: 0x06000525 RID: 1317 RVA: 0x0001DDA7 File Offset: 0x0001BFA7
		public HDualQuaternion(HQuaternion quat1, HQuaternion quat2) : base(quat1.RawData.TupleConcat(quat2.RawData))
		{
		}

		/// <summary>
		///   Deserialize a serialized dual quaternion.
		///   Modified instance represents: Dual quaternion.
		/// </summary>
		/// <param name="serializedItemHandle">Handle of the serialized item.</param>
		// Token: 0x06000526 RID: 1318 RVA: 0x0001DDC0 File Offset: 0x0001BFC0
		public void DeserializeDualQuat(HSerializedItem serializedItemHandle)
		{
			IntPtr proc = HalconAPI.PreCall(2052);
			HalconAPI.Store(proc, 0, serializedItemHandle);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			GC.KeepAlive(serializedItemHandle);
		}

		/// <summary>Multiply two dual quaternions.</summary>
		/// <param name="dualQuaternionLeft">Left dual quaternion.</param>
		/// <param name="dualQuaternionRight">Right dual quaternion.</param>
		/// <returns>Product of the dual quaternions.</returns>
		// Token: 0x06000527 RID: 1319 RVA: 0x0001DE0C File Offset: 0x0001C00C
		public static HDualQuaternion[] DualQuatCompose(HDualQuaternion[] dualQuaternionLeft, HDualQuaternion[] dualQuaternionRight)
		{
			HTuple htuple = HData.ConcatArray(dualQuaternionLeft);
			HTuple htuple2 = HData.ConcatArray(dualQuaternionRight);
			IntPtr proc = HalconAPI.PreCall(2059);
			HalconAPI.Store(proc, 0, htuple);
			HalconAPI.Store(proc, 1, htuple2);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HalconAPI.UnpinTuple(htuple2);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			return HDualQuaternion.SplitArray(data);
		}

		/// <summary>
		///   Multiply two dual quaternions.
		///   Instance represents: Left dual quaternion.
		/// </summary>
		/// <param name="dualQuaternionRight">Right dual quaternion.</param>
		/// <returns>Product of the dual quaternions.</returns>
		// Token: 0x06000528 RID: 1320 RVA: 0x0001DE7C File Offset: 0x0001C07C
		public HDualQuaternion DualQuatCompose(HDualQuaternion dualQuaternionRight)
		{
			IntPtr proc = HalconAPI.PreCall(2059);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, dualQuaternionRight);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(dualQuaternionRight);
			HDualQuaternion result;
			num = HDualQuaternion.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>Conjugate a dual quaternion.</summary>
		/// <param name="dualQuaternion">Dual quaternion.</param>
		/// <returns>Conjugate of the dual quaternion.</returns>
		// Token: 0x06000529 RID: 1321 RVA: 0x0001DEE4 File Offset: 0x0001C0E4
		public static HDualQuaternion[] DualQuatConjugate(HDualQuaternion[] dualQuaternion)
		{
			HTuple htuple = HData.ConcatArray(dualQuaternion);
			IntPtr proc = HalconAPI.PreCall(2060);
			HalconAPI.Store(proc, 0, htuple);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			return HDualQuaternion.SplitArray(data);
		}

		/// <summary>
		///   Conjugate a dual quaternion.
		///   Instance represents: Dual quaternion.
		/// </summary>
		/// <returns>Conjugate of the dual quaternion.</returns>
		// Token: 0x0600052A RID: 1322 RVA: 0x0001DF38 File Offset: 0x0001C138
		public HDualQuaternion DualQuatConjugate()
		{
			IntPtr proc = HalconAPI.PreCall(2060);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HDualQuaternion result;
			num = HDualQuaternion.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Interpolate two dual quaternions.
		///   Instance represents: Dual quaternion as the start point of the interpolation.
		/// </summary>
		/// <param name="dualQuaternionEnd">Dual quaternion as the end point of the interpolation.</param>
		/// <param name="interpPos">Interpolation parameter. Default: 0.5</param>
		/// <returns>Interpolated dual quaternion.</returns>
		// Token: 0x0600052B RID: 1323 RVA: 0x0001DF88 File Offset: 0x0001C188
		public HDualQuaternion[] DualQuatInterpolate(HDualQuaternion dualQuaternionEnd, HTuple interpPos)
		{
			IntPtr proc = HalconAPI.PreCall(2061);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, dualQuaternionEnd);
			HalconAPI.Store(proc, 2, interpPos);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(dualQuaternionEnd);
			HalconAPI.UnpinTuple(interpPos);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			HDualQuaternion[] result = HDualQuaternion.SplitArray(data);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Interpolate two dual quaternions.
		///   Instance represents: Dual quaternion as the start point of the interpolation.
		/// </summary>
		/// <param name="dualQuaternionEnd">Dual quaternion as the end point of the interpolation.</param>
		/// <param name="interpPos">Interpolation parameter. Default: 0.5</param>
		/// <returns>Interpolated dual quaternion.</returns>
		// Token: 0x0600052C RID: 1324 RVA: 0x0001E004 File Offset: 0x0001C204
		public HDualQuaternion DualQuatInterpolate(HDualQuaternion dualQuaternionEnd, double interpPos)
		{
			IntPtr proc = HalconAPI.PreCall(2061);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, dualQuaternionEnd);
			HalconAPI.StoreD(proc, 2, interpPos);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(dualQuaternionEnd);
			HDualQuaternion result;
			num = HDualQuaternion.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>Normalize a dual quaternion.</summary>
		/// <param name="dualQuaternion">Unit dual quaternion.</param>
		/// <returns>Normalized dual quaternion.</returns>
		// Token: 0x0600052D RID: 1325 RVA: 0x0001E074 File Offset: 0x0001C274
		public static HDualQuaternion[] DualQuatNormalize(HDualQuaternion[] dualQuaternion)
		{
			HTuple htuple = HData.ConcatArray(dualQuaternion);
			IntPtr proc = HalconAPI.PreCall(2062);
			HalconAPI.Store(proc, 0, htuple);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			return HDualQuaternion.SplitArray(data);
		}

		/// <summary>
		///   Normalize a dual quaternion.
		///   Instance represents: Unit dual quaternion.
		/// </summary>
		/// <returns>Normalized dual quaternion.</returns>
		// Token: 0x0600052E RID: 1326 RVA: 0x0001E0C8 File Offset: 0x0001C2C8
		public HDualQuaternion DualQuatNormalize()
		{
			IntPtr proc = HalconAPI.PreCall(2062);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HDualQuaternion result;
			num = HDualQuaternion.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Convert a unit dual quaternion into a homogeneous transformation matrix.
		///   Instance represents: Unit dual quaternion.
		/// </summary>
		/// <returns>Transformation matrix.</returns>
		// Token: 0x0600052F RID: 1327 RVA: 0x0001E118 File Offset: 0x0001C318
		public HHomMat3D DualQuatToHomMat3d()
		{
			IntPtr proc = HalconAPI.PreCall(2063);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HHomMat3D result;
			num = HHomMat3D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>Convert a dual quaternion to a 3D pose.</summary>
		/// <param name="dualQuaternion">Unit dual quaternion.</param>
		/// <returns>3D pose.</returns>
		// Token: 0x06000530 RID: 1328 RVA: 0x0001E168 File Offset: 0x0001C368
		public static HPose[] DualQuatToPose(HDualQuaternion[] dualQuaternion)
		{
			HTuple htuple = HData.ConcatArray(dualQuaternion);
			IntPtr proc = HalconAPI.PreCall(2064);
			HalconAPI.Store(proc, 0, htuple);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			return HPose.SplitArray(data);
		}

		/// <summary>
		///   Convert a dual quaternion to a 3D pose.
		///   Instance represents: Unit dual quaternion.
		/// </summary>
		/// <returns>3D pose.</returns>
		// Token: 0x06000531 RID: 1329 RVA: 0x0001E1BC File Offset: 0x0001C3BC
		public HPose DualQuatToPose()
		{
			IntPtr proc = HalconAPI.PreCall(2064);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HPose result;
			num = HPose.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Convert a unit dual quaternion into a screw.
		///   Instance represents: Unit dual quaternion.
		/// </summary>
		/// <param name="screwFormat">Format of the screw parameters. Default: "moment"</param>
		/// <param name="axisDirectionX">X component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionY">Y component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionZ">Z component of the direction vector of the screw axis.</param>
		/// <param name="axisMomentOrPointX">X component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointY">Y component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointZ">Z component of the moment vector or a point on the screw axis.</param>
		/// <param name="rotation">Rotation angle in radians.</param>
		/// <param name="translation">Translation.</param>
		// Token: 0x06000532 RID: 1330 RVA: 0x0001E20C File Offset: 0x0001C40C
		public void DualQuatToScrew(string screwFormat, out double axisDirectionX, out double axisDirectionY, out double axisDirectionZ, out double axisMomentOrPointX, out double axisMomentOrPointY, out double axisMomentOrPointZ, out double rotation, out double translation)
		{
			IntPtr proc = HalconAPI.PreCall(2065);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, screwFormat);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 4);
			HalconAPI.InitOCT(proc, 5);
			HalconAPI.InitOCT(proc, 6);
			HalconAPI.InitOCT(proc, 7);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HalconAPI.LoadD(proc, 0, num, out axisDirectionX);
			num = HalconAPI.LoadD(proc, 1, num, out axisDirectionY);
			num = HalconAPI.LoadD(proc, 2, num, out axisDirectionZ);
			num = HalconAPI.LoadD(proc, 3, num, out axisMomentOrPointX);
			num = HalconAPI.LoadD(proc, 4, num, out axisMomentOrPointY);
			num = HalconAPI.LoadD(proc, 5, num, out axisMomentOrPointZ);
			num = HalconAPI.LoadD(proc, 6, num, out rotation);
			num = HalconAPI.LoadD(proc, 7, num, out translation);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Transform a 3D line with a unit dual quaternion.
		///   Instance represents: Unit dual quaternion representing the transformation.
		/// </summary>
		/// <param name="lineFormat">Format of the line parameters. Default: "moment"</param>
		/// <param name="lineDirectionX">X component of the direction vector of the line.</param>
		/// <param name="lineDirectionY">Y component of the direction vector of the line.</param>
		/// <param name="lineDirectionZ">Z component of the direction vector of the line.</param>
		/// <param name="lineMomentOrPointX">X component of the moment vector or a point on the line.</param>
		/// <param name="lineMomentOrPointY">Y component of the moment vector or a point on the line.</param>
		/// <param name="lineMomentOrPointZ">Z component of the moment vector or a point on the line.</param>
		/// <param name="transLineDirectionX">X component of the direction vector of the transformed line.</param>
		/// <param name="transLineDirectionY">Y component of the direction vector of the transformed line.</param>
		/// <param name="transLineDirectionZ">Z component of the direction vector of the transformed line.</param>
		/// <param name="transLineMomentOrPointX">X component of the moment vector or a point on the transformed line.</param>
		/// <param name="transLineMomentOrPointY">Y component of the moment vector or a point on the transformed line.</param>
		/// <param name="transLineMomentOrPointZ">Z component of the moment vector or a point on the transformed line.</param>
		// Token: 0x06000533 RID: 1331 RVA: 0x0001E2E4 File Offset: 0x0001C4E4
		public void DualQuatTransLine3d(string lineFormat, HTuple lineDirectionX, HTuple lineDirectionY, HTuple lineDirectionZ, HTuple lineMomentOrPointX, HTuple lineMomentOrPointY, HTuple lineMomentOrPointZ, out HTuple transLineDirectionX, out HTuple transLineDirectionY, out HTuple transLineDirectionZ, out HTuple transLineMomentOrPointX, out HTuple transLineMomentOrPointY, out HTuple transLineMomentOrPointZ)
		{
			IntPtr proc = HalconAPI.PreCall(2066);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, lineFormat);
			HalconAPI.Store(proc, 2, lineDirectionX);
			HalconAPI.Store(proc, 3, lineDirectionY);
			HalconAPI.Store(proc, 4, lineDirectionZ);
			HalconAPI.Store(proc, 5, lineMomentOrPointX);
			HalconAPI.Store(proc, 6, lineMomentOrPointY);
			HalconAPI.Store(proc, 7, lineMomentOrPointZ);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 4);
			HalconAPI.InitOCT(proc, 5);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(lineDirectionX);
			HalconAPI.UnpinTuple(lineDirectionY);
			HalconAPI.UnpinTuple(lineDirectionZ);
			HalconAPI.UnpinTuple(lineMomentOrPointX);
			HalconAPI.UnpinTuple(lineMomentOrPointY);
			HalconAPI.UnpinTuple(lineMomentOrPointZ);
			num = HTuple.LoadNew(proc, 0, num, out transLineDirectionX);
			num = HTuple.LoadNew(proc, 1, num, out transLineDirectionY);
			num = HTuple.LoadNew(proc, 2, num, out transLineDirectionZ);
			num = HTuple.LoadNew(proc, 3, num, out transLineMomentOrPointX);
			num = HTuple.LoadNew(proc, 4, num, out transLineMomentOrPointY);
			num = HTuple.LoadNew(proc, 5, num, out transLineMomentOrPointZ);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Transform a 3D line with a unit dual quaternion.
		///   Instance represents: Unit dual quaternion representing the transformation.
		/// </summary>
		/// <param name="lineFormat">Format of the line parameters. Default: "moment"</param>
		/// <param name="lineDirectionX">X component of the direction vector of the line.</param>
		/// <param name="lineDirectionY">Y component of the direction vector of the line.</param>
		/// <param name="lineDirectionZ">Z component of the direction vector of the line.</param>
		/// <param name="lineMomentOrPointX">X component of the moment vector or a point on the line.</param>
		/// <param name="lineMomentOrPointY">Y component of the moment vector or a point on the line.</param>
		/// <param name="lineMomentOrPointZ">Z component of the moment vector or a point on the line.</param>
		/// <param name="transLineDirectionX">X component of the direction vector of the transformed line.</param>
		/// <param name="transLineDirectionY">Y component of the direction vector of the transformed line.</param>
		/// <param name="transLineDirectionZ">Z component of the direction vector of the transformed line.</param>
		/// <param name="transLineMomentOrPointX">X component of the moment vector or a point on the transformed line.</param>
		/// <param name="transLineMomentOrPointY">Y component of the moment vector or a point on the transformed line.</param>
		/// <param name="transLineMomentOrPointZ">Z component of the moment vector or a point on the transformed line.</param>
		// Token: 0x06000534 RID: 1332 RVA: 0x0001E3F4 File Offset: 0x0001C5F4
		public void DualQuatTransLine3d(string lineFormat, double lineDirectionX, double lineDirectionY, double lineDirectionZ, double lineMomentOrPointX, double lineMomentOrPointY, double lineMomentOrPointZ, out double transLineDirectionX, out double transLineDirectionY, out double transLineDirectionZ, out double transLineMomentOrPointX, out double transLineMomentOrPointY, out double transLineMomentOrPointZ)
		{
			IntPtr proc = HalconAPI.PreCall(2066);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, lineFormat);
			HalconAPI.StoreD(proc, 2, lineDirectionX);
			HalconAPI.StoreD(proc, 3, lineDirectionY);
			HalconAPI.StoreD(proc, 4, lineDirectionZ);
			HalconAPI.StoreD(proc, 5, lineMomentOrPointX);
			HalconAPI.StoreD(proc, 6, lineMomentOrPointY);
			HalconAPI.StoreD(proc, 7, lineMomentOrPointZ);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			HalconAPI.InitOCT(proc, 3);
			HalconAPI.InitOCT(proc, 4);
			HalconAPI.InitOCT(proc, 5);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HalconAPI.LoadD(proc, 0, num, out transLineDirectionX);
			num = HalconAPI.LoadD(proc, 1, num, out transLineDirectionY);
			num = HalconAPI.LoadD(proc, 2, num, out transLineDirectionZ);
			num = HalconAPI.LoadD(proc, 3, num, out transLineMomentOrPointX);
			num = HalconAPI.LoadD(proc, 4, num, out transLineMomentOrPointY);
			num = HalconAPI.LoadD(proc, 5, num, out transLineMomentOrPointZ);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>Convert a 3D pose to a unit dual quaternion.</summary>
		/// <param name="pose">3D pose.</param>
		/// <returns>Unit dual quaternion.</returns>
		// Token: 0x06000535 RID: 1333 RVA: 0x0001E4DC File Offset: 0x0001C6DC
		public static HDualQuaternion[] PoseToDualQuat(HPose[] pose)
		{
			HTuple htuple = HData.ConcatArray(pose);
			IntPtr proc = HalconAPI.PreCall(2080);
			HalconAPI.Store(proc, 0, htuple);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(htuple);
			HTuple data;
			num = HTuple.LoadNew(proc, 0, num, out data);
			HalconAPI.PostCall(proc, num);
			return HDualQuaternion.SplitArray(data);
		}

		/// <summary>
		///   Convert a 3D pose to a unit dual quaternion.
		///   Modified instance represents: Unit dual quaternion.
		/// </summary>
		/// <param name="pose">3D pose.</param>
		// Token: 0x06000536 RID: 1334 RVA: 0x0001E530 File Offset: 0x0001C730
		public void PoseToDualQuat(HPose pose)
		{
			IntPtr proc = HalconAPI.PreCall(2080);
			HalconAPI.Store(proc, 0, pose);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(pose);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Convert a screw into a dual quaternion.
		///   Modified instance represents: Dual quaternion.
		/// </summary>
		/// <param name="screwFormat">Format of the screw parameters. Default: "moment"</param>
		/// <param name="axisDirectionX">X component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionY">Y component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionZ">Z component of the direction vector of the screw axis.</param>
		/// <param name="axisMomentOrPointX">X component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointY">Y component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointZ">Z component of the moment vector or a point on the screw axis.</param>
		/// <param name="rotation">Rotation angle in radians.</param>
		/// <param name="translation">Translation.</param>
		// Token: 0x06000537 RID: 1335 RVA: 0x0001E588 File Offset: 0x0001C788
		public void ScrewToDualQuat(string screwFormat, HTuple axisDirectionX, HTuple axisDirectionY, HTuple axisDirectionZ, HTuple axisMomentOrPointX, HTuple axisMomentOrPointY, HTuple axisMomentOrPointZ, HTuple rotation, HTuple translation)
		{
			IntPtr proc = HalconAPI.PreCall(2086);
			HalconAPI.StoreS(proc, 0, screwFormat);
			HalconAPI.Store(proc, 1, axisDirectionX);
			HalconAPI.Store(proc, 2, axisDirectionY);
			HalconAPI.Store(proc, 3, axisDirectionZ);
			HalconAPI.Store(proc, 4, axisMomentOrPointX);
			HalconAPI.Store(proc, 5, axisMomentOrPointY);
			HalconAPI.Store(proc, 6, axisMomentOrPointZ);
			HalconAPI.Store(proc, 7, rotation);
			HalconAPI.Store(proc, 8, translation);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(axisDirectionX);
			HalconAPI.UnpinTuple(axisDirectionY);
			HalconAPI.UnpinTuple(axisDirectionZ);
			HalconAPI.UnpinTuple(axisMomentOrPointX);
			HalconAPI.UnpinTuple(axisMomentOrPointY);
			HalconAPI.UnpinTuple(axisMomentOrPointZ);
			HalconAPI.UnpinTuple(rotation);
			HalconAPI.UnpinTuple(translation);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Convert a screw into a dual quaternion.
		///   Modified instance represents: Dual quaternion.
		/// </summary>
		/// <param name="screwFormat">Format of the screw parameters. Default: "moment"</param>
		/// <param name="axisDirectionX">X component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionY">Y component of the direction vector of the screw axis.</param>
		/// <param name="axisDirectionZ">Z component of the direction vector of the screw axis.</param>
		/// <param name="axisMomentOrPointX">X component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointY">Y component of the moment vector or a point on the screw axis.</param>
		/// <param name="axisMomentOrPointZ">Z component of the moment vector or a point on the screw axis.</param>
		/// <param name="rotation">Rotation angle in radians.</param>
		/// <param name="translation">Translation.</param>
		// Token: 0x06000538 RID: 1336 RVA: 0x0001E64C File Offset: 0x0001C84C
		public void ScrewToDualQuat(string screwFormat, double axisDirectionX, double axisDirectionY, double axisDirectionZ, double axisMomentOrPointX, double axisMomentOrPointY, double axisMomentOrPointZ, double rotation, double translation)
		{
			IntPtr proc = HalconAPI.PreCall(2086);
			HalconAPI.StoreS(proc, 0, screwFormat);
			HalconAPI.StoreD(proc, 1, axisDirectionX);
			HalconAPI.StoreD(proc, 2, axisDirectionY);
			HalconAPI.StoreD(proc, 3, axisDirectionZ);
			HalconAPI.StoreD(proc, 4, axisMomentOrPointX);
			HalconAPI.StoreD(proc, 5, axisMomentOrPointY);
			HalconAPI.StoreD(proc, 6, axisMomentOrPointZ);
			HalconAPI.StoreD(proc, 7, rotation);
			HalconAPI.StoreD(proc, 8, translation);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Serialize a dual quaternion.
		///   Instance represents: Dual quaternion.
		/// </summary>
		/// <returns>Handle of the serialized item.</returns>
		// Token: 0x06000539 RID: 1337 RVA: 0x0001E6D8 File Offset: 0x0001C8D8
		public HSerializedItem SerializeDualQuat()
		{
			IntPtr proc = HalconAPI.PreCall(2092);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HSerializedItem result;
			num = HSerializedItem.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		// Token: 0x040000AC RID: 172
		private const int FIXEDSIZE = 8;
	}
}
